package org.demo.datasoureces.service.impl;

import org.demo.datasoureces.dao.UserInfoMapper;
import org.demo.datasoureces.entity.UserInfo;
import org.demo.datasoureces.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserInfoServiceImpl implements UserInfoService {
    @Autowired
    UserInfoMapper userInfoMapper;

    @Override
    public int insertData(UserInfo userInfo) {
        return userInfoMapper.insert(userInfo);
    }

    @Override
    public UserInfo queryUserInfoById(Long id) {
        return userInfoMapper.selectById(id);
    }

    @Override
    public int queryMaxId() {
        return userInfoMapper.selectCount(null);
    }

}
